package it.prova.activator;

import it.prova.listener.MyResourceChangeListener;

import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public class MyActivator extends AbstractUIPlugin
{
	@Override
	public void start(BundleContext context) throws Exception
	{
		System.out.println("start");
		super.start(context);
		
		IResourceChangeListener listener = new MyResourceChangeListener();
		ResourcesPlugin.getWorkspace().addResourceChangeListener
		(
			listener, 
			IResourceChangeEvent.POST_BUILD
		);
	}
}